AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()
	self.Entity:SetModel( "models/Slyfo/rover1_battery.mdl" )
	self.Entity:SetColor(255, 0, 0, 255)
	self.Entity:SetName("Power Core 1")
	self.Entity:PhysicsInit( SOLID_VPHYSICS )
	self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
	self.Entity:SetSolid( SOLID_VPHYSICS )
	local phys = self.Entity:GetPhysicsObject()
	if (phys:IsValid()) then
		phys:Wake()
		phys:EnableGravity(true)
		phys:EnableCollisions(true)
		phys:EnableDrag(true)
	end
end
self.components = {}
self.components["nniill"] = "nnniiilll"
//remember, component[ key ] = value


function ENT:StartTouch( ent )
	for k,v in pairs(components) do
		if v == ent:GetClass() then
			ent:Remove()
			local thing = ents.Create( k )
			thing:SetPos(self.Entity:GetPos())
			thing:Spawn()
			self.Entity:Remove()
		end
	end
end
			